/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * GameFrame.java
 *
 * Created on 16/10/2009, 23:17:15
 */

package Xadrez.View;

import java.awt.event.ActionListener;

/**
 *
 * @author Leonardo
 */
public class GameFrame extends javax.swing.JFrame {

    /** Creates new form GameFrame */
    public GameFrame() {
        initComponents();
    }

    public void AdicionarOuvinte(ActionListener ouvinte){
        //this.jButtonAdicionar.addActionListener(ouvinte);
        this.jMenuItem1.addActionListener(ouvinte);
        this.jMenuItem2.addActionListener(ouvinte);
        this.jMenuItem3.addActionListener(ouvinte);

    }

    public Object getMenuItem1(){
        return this.jMenuItem1;
    }

    public Object getMenuItem2(){
        return this.jMenuItem2;
    }

    public Object getMenuItem3(){
        return this.jMenuItem3;
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jMenu1.setText("File");

        jMenuItem1.setText("Jogar contra computador");
        jMenu1.add(jMenuItem1);

        jMenuItem2.setText("Jogar contra outra pessoa");
        jMenu1.add(jMenuItem2);

        jMenuItem3.setText("Sair");
        jMenu1.add(jMenuItem3);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 279, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GameFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    public javax.swing.JMenuItem jMenuItem1;
    public javax.swing.JMenuItem jMenuItem2;
    public javax.swing.JMenuItem jMenuItem3;
    // End of variables declaration//GEN-END:variables

}
